package com.example.tianyidemo.service.impl;

import com.example.tianyidemo.Mapper.UserMapper;
import com.example.tianyidemo.pojo.User;
import com.example.tianyidemo.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceimpl implements UserService {
    private static final Logger logger = LoggerFactory.getLogger(UserServiceimpl.class);
    //  service不能操作数据库，调用mapper接口
    @Autowired
    private UserMapper userMapper;
    @Override
    public User login(User user) {
        System.out.println("进入");
        System.out.println(user);
        return userMapper.getByuserNameAnduserPwd(user);
    }
}
